home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / bin / xml2-config < prev    next >
Text File  |  2006-04-25  |  2KB  |  104 lines

  1. #! /bin/sh
  2.  
  3. prefix=/usr
  4. exec_prefix=${prefix}
  5. includedir=${prefix}/include
  6. libdir=${exec_prefix}/lib
  7.  
  8. usage()
  9. {
  10.     cat <<EOF
  11. Usage: xml2-config [OPTION]
  12.  
  13. Known values for OPTION are:
  14.  
  15.   --prefix=DIR        change libxml prefix [default $prefix]
  16.   --exec-prefix=DIR    change libxml exec prefix [default $exec_prefix]
  17.   --libs        print library linking information
  18.   --cflags        print pre-processor and compiler flags
  19.   --modules        module support enabled
  20.   --help        display this help and exit
  21.   --version        output version information
  22. EOF
  23.  
  24.     exit $1
  25. }
  26.  
  27. if test $# -eq 0; then
  28.     usage 1
  29. fi
  30.  
  31. cflags=false
  32. libs=false
  33.  
  34. while test $# -gt 0; do
  35.     case "$1" in
  36.     -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  37.     *) optarg= ;;
  38.     esac
  39.  
  40.     case "$1" in
  41.     --prefix=*)
  42.     prefix=$optarg
  43.     includedir=$prefix/include
  44.     libdir=$prefix/lib
  45.     ;;
  46.  
  47.     --prefix)
  48.     echo $prefix
  49.     ;;
  50.  
  51.     --exec-prefix=*)
  52.       exec_prefix=$optarg
  53.       libdir=$exec_prefix/lib
  54.       ;;
  55.  
  56.     --exec-prefix)
  57.       echo $exec_prefix
  58.       ;;
  59.  
  60.     --version)
  61.     echo 2.6.23
  62.     exit 0
  63.     ;;
  64.  
  65.     --help)
  66.     usage 0
  67.     ;;
  68.  
  69.     --cflags)
  70.            echo -I${includedir}/libxml2 
  71.            ;;
  72.  
  73.     --libtool-libs)
  74.     echo ${libdir}/libxml2.la
  75.         ;;
  76.  
  77.     --modules)
  78.            echo 1
  79.            ;;
  80.  
  81.     --libs)
  82.         if [ "`uname`" = "Linux" ]
  83.     then
  84.         if [ "-L${libdir}" = "-L/usr/lib64" ]
  85.         then
  86.         echo -lxml2 -lz   -lm  
  87.         else
  88.         echo -L${libdir} -lxml2 -lz   -lm  
  89.         fi
  90.     else
  91.         echo -L${libdir} -lxml2 -lz   -lm  
  92.     fi
  93.            ;;
  94.  
  95.     *)
  96.     usage
  97.     exit 1
  98.     ;;
  99.     esac
  100.     shift
  101. done
  102.  
  103. exit 0
  104.